package com.ch.mobilesha.base;

import android.app.Application;
import android.content.Intent;

import com.ch.mobilesha.common.CommonData;
import com.ch.mobilesha.img.PictrueManager;

public class MobileShaApplication extends Application {
	public static MobileShaApplication mApp;
	private PictrueManager mPictrueManager;
	public PictrueManager getPictrueManager() {
		return mPictrueManager;
	}
	@Override
	public void onCreate() {
		super.onCreate();
		mApp = (MobileShaApplication) getApplicationContext();
		mPictrueManager = new PictrueManager(this);
		if(!CommonData.isTest){
			Thread.setDefaultUncaughtExceptionHandler(BaseCrashHandler.getBaseCrashHandler(getApplicationContext()));
		}
	}
	public static MobileShaApplication getSelf() {
		return mApp;
	}
	
	public void exit() {
		sendBroadcast(new Intent(CommonData.INTENT_ACTION_EXIT_APP));
	}
}
